﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Constant;
using Pixysoft.Weblications.Sango.Environment;
using Pixysoft.Weblications.Sango.Formular;

namespace Pixysoft.Weblications.Sango.Command.equipment
{
    partial class SangoEquipmentHandler
    {
        public eqm_upgradecooldowninfo eqm_upgradecooldowninfo()
        {
            string userCode = SangoManager.Authentication();

            eqm_upgradecooldowninfo response = ReflectionManager.CreatePojo<eqm_upgradecooldowninfo>();
            response.Succeed = false;


            Entities.Usr_Queue usrQueue = UsrQueueDao.tryGetRunningQueue(userCode, CtiQueueTypecodeCollection.EQUIPMENT_UPGRADE);

            if (usrQueue == null)
            {
                response.Message = "无须冷却队列";
                return response;
            }

            Entities.Sys_Queue sysQueue = SysQueueHelper.searchByCode(usrQueue.Queueserialcode);

            response.goldprice = (QueueFormular.getQueueCooldownGoldPrice(usrQueue, sysQueue));
            response.Succeed = true;
            return response;
        }


    }
    public interface eqm_upgradecooldowninfo : ISangoResponse
    {
        long goldprice { get;set;}
    }
}
